from llm import NovelLLM
from util import writeFile
from .base import BaseNode

class Step8Node(BaseNode):
    def run(self, state):
        prompt = "第八步：场景清单\n当前完整大纲：{outline}\n请列出小说中所有场景，每个场景包含冲突和出场人物".format(outline=state['step7_output'])
        result = NovelLLM().call_llm(prompt, caller_name="Step8")
        state['step8_output'] = result
        writeFile("output/step8.txt", result)
        print(f"Step8 完成场景清单生成")
        return state